{% extends "default.html" %}

{% load i18n %}
{% load jalali_view %}

{% block title %} {% trans "Ad Orders List" %}{% endblock %}

{% block page_content %}

<div>
	{% include "ad/ad_display.html" %}
	<br class="clear" />
	<div style="width: 65%">
		<span style="float: right;">{% trans "Amount" %}: {{ order.amount }}</span>
		<span style="float: left;">
			{% trans "Balance" %}: 
			{% if payable %}
			{{ credit }}
			{% else %}
			<span style="color:red;">{{ credit }}</span>
			{% endif %}
		</span>
	</div>
	<br class="clear" />
	{% if freepolicy %}
	<div>
		<p style="color:red;">{% trans "You are using free ad payment policy" %}</p>
	</div>
	<br class="clear" />
	{% endif %}
	{% if payable %}
	<div>
		<form action="/ads/orders/pay/" method="post">
		{% csrf_token %}
		<input type="hidden" name="id" value="{{ order.id }}" />
		<br class="clear"/>
		<div class="form_buttons">
			<input type="submit" value='{% trans "Approve" %}' class="form_button"/>
		</div>
		</form>
	</div>
	{% endif %}
</div>

{% endblock page_content %}
